The amount of video data needed to depict even a relatively short film can be substantial, which may result in difficulties when the data is to be streamed or otherwise communicated across a communications network with limited bandwidth capacity. Thus, video data is generally compressed before being communicated across modern day telecommunications networks. Video compression devices often use software and/or hardware at the source to code the video data prior to transmission, thereby decreasing the quantity of data needed to represent digital video images. The compressed data is then received at the destination by a video decompression device that decodes the video data. With limited network resources and ever increasing demands of higher video quality, improved compression and decompression techniques that improve compression ratio with little to no sacrifice in image quality are desirable.
For example, video compression may encode prediction residuals (representing a difference between an original pixel and a prediction pixel) instead of original pixels to reduce bit rate. The prediction residuals may be transformed and quantized leading to quantized transform coefficients, which may then be scanned to determine positions of non-zero coefficients. Since non-zero coefficients may typically be located in a top-left section of a transform block, existing scanning schemes may have been designed for this distribution pattern of non-zero coefficients. In schemes in which a transform may be bypassed, non-zero coefficients may not be concentrated in a top-left section. Accordingly, when scanning prediction residuals, which may have non-zero values anywhere in a residual block, the existing scanning schemes may be inefficient.